package io.renren.modules.evaluate.service.imp;

import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.evaluate.dao.NormMesDao;
import io.renren.modules.evaluate.entity.NormMesEntity;
import io.renren.modules.evaluate.service.NormMesService;


@Service("normMesService")
public class NormMesServiceImpl extends ServiceImpl<NormMesDao, NormMesEntity> implements NormMesService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {

        IPage<NormMesEntity> page = this.page(
                new Query<NormMesEntity>().getPage(params),
                new QueryWrapper<NormMesEntity>()
        );
        return new PageUtils(page);
    }

    @Override
    public NormMesEntity queryByNormName(String normName){
        return baseMapper.queryByNormName(normName);
    }

}